package com.leruan.aasimp.service;

import java.util.List;
import java.util.Map;

import com.leruan.aasimp.bean.UsedCarBuyMainBean;
import com.leruan.aasimp.bean.UsedCarSaleMainBean;
import com.leruan.aasimp.entity.CarSaleImage;
import com.leruan.aasimp.entity.UsedCarBuy;
import com.leruan.aasimp.entity.UsedCarSale;

public interface UsedCarService {

	/**
	 * 根据条件得到usedCarSaleList,分页
	 * 
	 * @throws Exception
	 * */
	public List<UsedCarSaleMainBean> getUsedCarSaleList(Map<String, Object> map, int pageNo)throws Exception;
	
	/**
	 * 根据条件得到usedCarSaleBean记录总数
	 * 
	 * @throws Exception
	 * */
	public Long getUsedSaleTotal(Map<String, Object> map)throws Exception;

	/**
	 * 根据id获取二手车出售信息
	 * 
	 * @throws Exception
	 * */
	public UsedCarSale getSaleInfoById(String id)throws Exception;
	
	
	/**
	 * 根据条件得到usedCarBuyList,分页
	 * 
	 * @throws Exception
	 * */
	public List<UsedCarBuyMainBean> getUsedCarBuyList(Map<String, Object>map, int pageNo)throws Exception;

	/**
	 * 根据条件得到usedCarBuyBean记录总数
	 * 
	 * @throws Exception
	 * */
	public Long getUsedBuyTotal(Map<String, Object> map)throws Exception;

	/**
	 * 根据id得到一条求购记录的详细信息
	 * 
	 * @throws Exception
	 * */
	public UsedCarBuy getUsedCarBuyById(String id)throws Exception;
	
	/**
	 * 根据id割到一条出售记录的详细信息
	 * 
	 * @throws Exception
	 * */
	public UsedCarSale getUsedCarSaleById(String id)throws Exception;

	
	/**
	 * 根据出售信息记录id跟到图片路径集合
	 * 
	 * @throws Exception
	 * */
	public List<String> getImagesUrlById(String id)throws Exception;

	
	/**
	 * 更新UsedCarSale
	 * 
	 * @throws Exception
	 * */
	public void updateUsedCarSale(UsedCarSale usedCarSale)throws Exception;

	/**
	 * 根据userId获取我发布的二手车出售信息
	 * 
	 * @throws Exception
	 * */
	public List<UsedCarSaleMainBean> getUsedCarSaleListById(String userId)throws Exception;

	/**
	 * 根据userId获取我发布的二手车求购信息
	 * 
	 * @throws Exception
	 * */
	public List<UsedCarBuyMainBean> getUsedCarBuyListById(String userId)throws Exception;

	/**
	 * 根据id、userId删除我发布的二手车出售信息
	 * 
	 * @throws Exception
	 * */
	public void deleteMyUsedCarSale(String id, String userId)throws Exception;

	/**
	 * 根据id、userId删除我发布的二手车求购信息
	 * 
	 * @throws Exception
	 * */
	public void deleteMyUsedCarBuy(String id, String userId)throws Exception;

	/**
	 * 新增二手车求购信息
	 * 
	 * @throws Exception
	 * */
	public void saveUsedCarBuy(Map<String, String> map)throws Exception;

	public void saveUsedCarSale(UsedCarSale usedCarSale)throws Exception;

	public Long findId(UsedCarSale usedCarSale)throws Exception;

	public void saveImage(CarSaleImage carSaleImage)throws Exception;

	public void updateUsedCarBuy(UsedCarBuy usedCarBuy);
	
}
